/*
* @Author: gavin
* @Date:   2017-12-20 13:27:18
* @Last Modified by:   gavin
* @Last Modified time: 2017-12-25 14:14:24
*/
import React from 'react';
import { Switch, Route, Redirect } from 'react-router-dom';

import Home from './Home';
import Backlog from './backlog';
import BacklogView from './backlog/view';
import Test from './Test';
import NotFound from '../404';
import layout from './layout';


const index = ({ match }) => ( // eslint-disable-line react/prop-types
  <Switch>
    <Route exact path={`${match.url}/`} component={Home} />
    <Route path={`${match.url}/test`} component={Test} />
    <Route path={`${match.url}/backlog`} component={Backlog} />
    <Route path={`${match.url}/backlogview`} component={BacklogView} />
    <Route component={NotFound} />
  </Switch>
);

// export default index;
export default layout(index);
// <Redirect exact from="/home" to="/" />
// <Route component={NotFound}/>
